<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>计算结果</title>
  <style>
    table {
      width: 50%;
      border-collapse: collapse;
      margin: 50px auto;
    }

    th,
    td {
      border: 1px solid #333;
      padding: 10px;
      text-align: center;
    }

    th {
      background-color: #f2f2f2;
    }
  </style>
</head>

<body>

  和是 <span id="result"> </span>
  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
  <script>
    getSum();
    function getSum() {
      $.ajax({
        url: "calc/getsum",
        type: "get",
        success: function (result) {
          $("#result").text(result);
        }
      });
    }

  </script>
</body>

</html>